<?php
namespace App\Adshopuser\Models;
use Common\BaseModel;
class BshopUsersInfo extends BaseModel
{
    public $res;
    public $expire;
    public function initialize()
    {
        parent::initialize();
        $this->setSource('b_shop_users_info');
    }


    public function get_shop_goods_list($param){
        $sql=<<<EFO
select uinfo.* from b_shop_users_info as uinfo
left join b_shop_users as bu on uinfo.shop_id= bu.id
where uinfo.shop_id={$param['shop_id']} LIMIT 1; 
EFO;
        $get_list = $this->getDI()->get('dbMaster')->fetchOne($sql);
        return $get_list;
    }


    public function find_first($shop_id){
        $get_list = $this->findFirst(array(
            'conditions'=>"shop_id=$shop_id",
            'columns'=>'shop_id,shop_name,shop_avatar,created_at,shop_introduction,is_disable',
        ));
        return $get_list;
    }


}
